package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface OrderDetailMapper {
    void insertBatch(List<OrderDetail> orderDetailList);

    @Delete("delete from order_detail where order_id=#{orderId}")
    void deleteByOrderId(Long orderId);

    List<OrderDetail> getByOrderId(Long id);


    List<String> GetTop10NameByLocalDate(LocalDateTime date1, LocalDateTime date2);
    List<Integer> GetTop10NumberByLocalDate(LocalDateTime date1, LocalDateTime date2);

}
